/*
 * Package il.ac.biu.cs.grossmm.api.presence
 * File PidfTuple.java
 * 
 * This is a part of presence service framework API. 
 * See javadoc for more information.
 *  
 * Copyright (C) 2006 Grossmann Mark
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
package il.ac.biu.cs.grossmm.api.presence;

import static il.ac.biu.cs.grossmm.api.data.NodeTypeByInterface.*;
import il.ac.biu.cs.grossmm.api.data.NodeInterface;
import il.ac.biu.cs.grossmm.api.data.Nodeset;
import il.ac.biu.cs.grossmm.api.data.Property;
import il.ac.biu.cs.grossmm.api.data.Unique;

/**
 * Data node type interface which repsresents a pidf tuple. Pidf tuple contains
 * the following:
 * <ul>
 * <li> Identifier: token to identify this tuple within the presence
 * information.
 * <li> STATUS: OPEN/CLOSED and/or extension status values.
 * <li> COMMUNICATION ADDRESS: COMMUNICATION MEANS and CONTACT ADDRESS of this
 * tuple. (optional)
 * <li> Relative priority: numerical value specifying the priority of this
 * COMMUNICATION ADDRESS. (optional)
 * <li> Timestamp: timestamp of the change of this tuple.(optional)
 * <li> Human readable comment: free text memo about this tuple (optional)
 */
public interface PidfTuple extends NodeInterface {
	/**
	 * Unique tuple identifier. Holds value of /pidf/tuple/@id for this tuple
	 */
	Unique<PidfTuple, String> ID = unique(PidfTuple.class, String.class);

	/**
	 * Basic presence status. True iff the basic status is "open". Represents
	 * /pidf/tuple[@id=ID]/status/basic.
	 */
	Property<PidfTuple, Boolean> BASIC_STATUS =
		property(PidfTuple.class, Boolean.class);

	/**
	 * Communication address associated with this tuple, or null if contact is
	 * not specified. Holds value of /pidf/tuple/contact
	 */
	Property<PidfTuple, String> CONTACT =
		property(PidfTuple.class, String.class);

	/**
	 * Relative priority of this contact in range [0.0, 1.0] or -1.0 if priority
	 * is not specified (a lowest priority should be assumed for such contacts).
	 * Holds value of of /pidf/tuple/contact/@priority
	 */
	Property<PidfTuple, Float> PRIORITY =
		property(PidfTuple.class, Float.class);

	/**
	 * A human readable comment. This is a set of notes in this pidf tuple. This
	 * set is empty if no notes associated with this tuple. Represents set of
	 * all /pidf/tuple/note elements
	 */
	Nodeset<PidfTuple, PidfNote> NOTES =
		nodeset(PidfTuple.class, PidfNote.class);

	// ##other
}
